package com.zretc.auth.controller;


import com.zretc.api.pojo.SysUser;
import com.zretc.auth.service.LoginService;
import com.zretc.common.entity.RespResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/auth")
public class LoginController {
    //service
    @Autowired
    private LoginService service;

    @PostMapping("/login")
    public RespResult login(@RequestBody SysUser user){
        return service.login(user);
    }

//    @RequestMapping("/logout1")
//    public RespResult logout(){
//
//        return service.logout();
//    }
}
